package demo1;

import java.util.LinkedList;
import java.util.Queue;

public class Test {
    public static void main(String[] args) {
        demo1.Queue queue = new demo1.Queue();
        queue.offer(1);
        queue.offer(2);//入队列
        int val1 = queue.poll(1);
        System.out.println(val1);
        int val2 = queue.peek();
        System.out.println(val2);
    }
    public static void main1(String[] args) {
        Queue<Integer> queue = new LinkedList<>();
        queue.offer(1);
        queue.offer(2);//入队列
        int val1 = queue.poll();
        System.out.println(val1);
        int val2 = queue.peek();
        System.out.println(val2);

    }
}
